package com.spark.invoicings.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * 采购退货单明细
 */
@Data
@TableName("purchase_return_details")
public class PurchaseReturnDetails implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Integer purchaseReturnDetailId; // 采购退货明细id
    private Integer purchaseReturnOrderId; // 采购退货单id
    private Integer productId; // 商品id
    private double returnUnitPrice; // 退货单价
    private Integer purchaseOrderDetail; // 退货采购明细
    private double refundAmount; // 应退款金额
    private Integer returnQuantity; // 本次退货数量

    /**
     * 采购退货明细关联对象
     */
    @TableField(exist = false)
    private PurchaseReturnOrder purchaseReturnOrder;
    @TableField(exist = false)
    private Product product;
    @TableField(exist = false)
    private PurchaseDetail purchaseDetail;

    public PurchaseDetail getPurchaseDetail() {
        return purchaseDetail;
    }

    public void setPurchaseDetail(PurchaseDetail purchaseDetail) {
        this.purchaseDetail = purchaseDetail;
    }

    public PurchaseReturnOrder getPurchaseReturnOrder() {
        return purchaseReturnOrder;
    }

    public void setPurchaseReturnOrder(PurchaseReturnOrder purchaseReturnOrder) {
        this.purchaseReturnOrder = purchaseReturnOrder;
    }

    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }

    public Integer getReturnQuantity() {
        return returnQuantity;
    }

    public void setReturnQuantity(Integer returnQuantity) {
        this.returnQuantity = returnQuantity;
    }

    public Integer getPurchaseReturnDetailId() {
        return purchaseReturnDetailId;
    }

    public void setPurchaseReturnDetailId(Integer purchaseReturnDetailId) {
        this.purchaseReturnDetailId = purchaseReturnDetailId;
    }

    public Integer getPurchaseReturnOrderId() {
        return purchaseReturnOrderId;
    }

    public void setPurchaseReturnOrderId(Integer purchaseReturnOrderId) {
        this.purchaseReturnOrderId = purchaseReturnOrderId;
    }

    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    public double getReturnUnitPrice() {
        return returnUnitPrice;
    }

    public void setReturnUnitPrice(double returnUnitPrice) {
        this.returnUnitPrice = returnUnitPrice;
    }

    public Integer getPurchaseOrderDetail() {
        return purchaseOrderDetail;
    }

    public void setPurchaseOrderDetail(Integer purchaseOrderDetail) {
        this.purchaseOrderDetail = purchaseOrderDetail;
    }

    public double getRefundAmount() {
        return refundAmount;
    }

    public void setRefundAmount(double refundAmount) {
        this.refundAmount = refundAmount;
    }
}
